Navigation View Model
ViewModel responsible for managing the navigation drawer UI state, specifically tracking the user's login state, and providing it to the UI layer.
The NavigationViewModel uses the UserRepository to observe the user's authentication state and updates the UI state accordingly. It listens for changes in the authentication state and reflects these changes in the NavDrawerUiState.
This ViewModel is scoped to the lifecycle of the navigation UI and ensures that the UI is updated with the correct login state based on the user's authentication status.
Parameters
user Repository
The repository that handles user authentication and retrieval of authentication state. Injected via Hilt for dependency management.